package com.csdj.t309.papermanage.controller;

import com.csdj.t309.papermanage.entity.Paper;
import com.csdj.t309.papermanage.service.PaperService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class PaperController {
    @Resource
    private PaperService paperService;

    @GetMapping("paperList")
    public String paperList(Model model){
        List<Paper> plist = paperService.select();
        model.addAttribute("plist",plist);
        return "paperList";
    }

    @GetMapping("addPaper")
    public String addPaper(){
        return "addPaper";
    }

    @PostMapping("/doAdd")
    public String doAdd(){
        return "";
    }
}
